package com.zmm.study.order.dao;

import com.zmm.study.order.model.WareOrderTaskDetail;
import com.zmm.study.order.vo.SkuIdWareIdVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author 900045
 * @description:
 * @name WareSkuDao
 * @date By 2021-10-20 16:42:04
 */
@Mapper
public interface WareSkuDao {
	
	/**
	 * 根据 skuId 集合 查询 仓库集合
	 * @author: 900045
	 * @date: 2021-10-20 16:49:43
	 * @throws 
	 * @param skuIdList: 
	 * @return: java.util.List<com.zmm.study.order.vo.SkuIdWareIdVo>
	 **/
	List<SkuIdWareIdVo> findWareIdHasSkuStock(@Param("skuIdList") List<Long> skuIdList);

	/**
	 * 锁定库存
	 * @author: 900045
	 * @date: 2021-10-20 16:58:08
	 * @throws 
	 * @param skuId: 
	 * @param wareId: 
	 * @param num: 
	 * @return: java.lang.Integer
	 **/
	Integer lockSkuStock(@Param("skuId") Long skuId, @Param("wareId") Long wareId, @Param("num") Integer num);

	/**
	 * 解锁库存
	 * @author: 900045
	 * @date: 2021-10-20 17:38:39
	 * @throws 
	 * @param skuId: 
	 * @param wareId: 
	 * @param num: 
	 * @return: void
	 **/
	void unLockStock(@Param("skuId") Long skuId, @Param("wareId") Long wareId, @Param("num") Integer num);

	/**
	 * 批量解锁库存
	 * @author: 900045
	 * @date: 2021-10-21 11:39:17
	 * @throws 
	 * @param wareOrderTaskDetailList: 
	 * @return: void
	 **/
	void batchUnLockStock(List<WareOrderTaskDetail> wareOrderTaskDetailList);
}
